package com.lyf.baoxian.activity;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;

import com.lyf.baoxian.R;
import com.lyf.baoxian.adapter.HistoryAdapter;
import com.lyf.baoxian.bean.HistoryCustomer;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by 刘亚飞 on 2017/1/9.
 */

public class HisCustomerActivity extends Activity{
    private ListView lv_customer;
    private List<HistoryCustomer> datas;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_customer);
        initData();
        lv_customer = (ListView) findViewById(R.id.lv_customer);
        HistoryAdapter adapter = new HistoryAdapter(HisCustomerActivity.this);
        adapter.setDatas(datas);
        lv_customer.setAdapter(adapter);

    }

    private void initData() {
        datas = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            datas.add(new HistoryCustomer(R.drawable.test,"张三丰","128322222244556","玉米保险"));
        }
    }
}
